$(function(){
    showCondition(true);
	
    paramTabPage[tabId]= $("#tabContent > .tab-pane.active").data();
    if(typeof(paramTabPage[tabId].previous)=="undefined")
	{
		$('#'+tabId+' #hosp-title').append(paramTabPage[tabId].title);
	}
	else
	{
		if(paramTabPage[tabId].previous=="mdc")
		{
			$('#'+tabId+' #hosp-title').append("MDC指标");
		}
		else if(paramTabPage[tabId].previous=="adrg")
		{
			$('#'+tabId+' #hosp-title').append("ADRG指标");
		}
		else if(paramTabPage[tabId].monitorType=="depGroup")
		{
			$('#'+tabId+' #hosp-title').append("科室组指标");
		}
		else if(paramTabPage[tabId].monitorType=="dep")
		{
			$('#'+tabId+' #hosp-title').append("科室指标");
		}
		else if(paramTabPage[tabId].monitorType=="ward")
		{
			$('#'+tabId+' #hosp-title').append("病区指标");
		}
		else if(paramTabPage[tabId].monitorType=="clinic")
		{
			$('#'+tabId+' #hosp-title').append("主诊医师指标");
		}
		else if(paramTabPage[tabId].monitorType=="protomedicus")
		{
			$('#'+tabId+' #hosp-title').append("主任医师指标");
		}
		else if(paramTabPage[tabId].monitorType=="physician")
		{
			$('#'+tabId+' #hosp-title').append("主治医师指标");
		}
		else if(paramTabPage[tabId].monitorType=="resident")
		{
			$('#'+tabId+' #hosp-title').append("住院医师指标");
		}
	}
	
	
	getQuotas("ybbDepLineAdrg", loadData, "deplineadrgallhosp-ul","adrg");
	
	function loadData(totalQuota){
		// 全院指标 (1.Hosp 2.All)  参数 4.为jsp中的div的id 5.jsp中ul的id
		loadHospQuota(paramTabPage[tabId].monitorType,totalQuota,"deplineadrgallhospQuotasId","deplineadrgallhosp-ul","ybDepLineAdrgTotal");	
		// 加载指标的div 参数 3.为jsp中的div的id 4.jsp中ul的id
		loadDRGsQuota(totalQuota,"adrg","ADRG","deplineadrgQuotasId","deplineadrg-ul");
	    // 科室组指标的数据加载 
	    loadDRGsQuotaData(totalQuota,"adrg",true,"ybDepLineAdrgDetail");
	}
});


